﻿namespace Sai.Test
{
    using Sai.Core;
    using Sai.Core.Reporting;
    using Sai.Test.XUnit;
    using System;
    using Xunit;

	public class ProductAssemblyFacts
	{
		public class OnSerialization
		{
			
			[Fact, InMemoryTest]
			public void Creates_Single_Line_Containing_Name_And_ID()
			{
				var assembly = new ProductAssembly("C:\\API\\MyAssembly", DateTime.Now, 1024, "abcd");

                string output = ObjectFlattener<ProductAssembly>.Flatten(assembly);

				Assert.Contains("<Assembly ", output);
				Assert.Contains(" ID=", output);
				Assert.Contains(" Name=\"MyAssembly\" />", output);
			}
		}
	}
}
